# -*- encoding: utf-8 -*-
'''
@File    :   1.09.py
@Time    :   2022/10/23 20:33:25
@Author  :   Cms 
@Version :   1.0
@Contact :   2267000140@qq.com
@WebSite    :   www.baidu.com
'''

# here put the import lib

# 定义一个集合类型的变量(用2种方法初始化),然后进行相应的 元素的操作

#第一种
basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
print(basket)

#第二种
basket1 = set('apple')
print(basket1)

basket1.add('b')
print(basket1)

basket1.update('j','k')
print(basket1)

basket1.remove('b')
print(basket1)

basket1.discard('k')
print(basket1)

print(len(basket1))

print('e' in basket1)